//
//  RHUserModel.h
//  RuiHeAppApp
//
//  Created by Yan Chen on 2023/8/2.
//

#import "BaseModel.h"
#import "RHRoleModel.h"
NS_ASSUME_NONNULL_BEGIN

//用户角色
typedef NS_ENUM(NSUInteger, UserRoleType) {
    UserRoleTypeManufacture    = 1001,  //厂家
    UserRoleTypeBrandMerchants = 2001,  //品牌商
    UserRoleTypeNationalAgency = 3001,  //国家代理
    UserRoleTypeDealer         = 4001,  //经销商
    UserRoleTypeLargeInstaller = 5001,  //安装商
    UserRoleTypeSmallInstaller = 6001,  //小型安装
    UserRoleTypeTerminalUser   = 7001,  //终端用户
    UserRoleTypeNormalUser     = 8001   //普通用户
};

//用户所属组织的营运类型
typedef NS_ENUM(NSUInteger, OperationType) {
    OperationTypeUnknow         = 0,  //未知
    OperationTypeIndustry       = 1,  //工商储
    OperationTypeHouse          = 2,  //户储
    OperationTypeLargeIndustry  = 3   //大储
};

//用户所属组织的类型
typedef NS_ENUM(NSUInteger, OrganizationType) {
    OrganizationTypeMerchants    = 0,  //品牌商
    OrganizationTypeOperation       = 1,  //运营
    OrganizationTypeInstaller       = 2,  //安装公司
    OrganizationTypeUser            = 3   //用户
};



@interface RHUserModel : BaseModel<NSCoding>
//邮箱
@property(nonatomic,copy)NSString *email;
//用户名(暂时不用,用昵称)
@property(nonatomic,copy)NSString *userName;
//昵称
@property(nonatomic,copy)NSString *nickName;
//备注
@property(nonatomic,copy)NSString *remarkName;
//自己电话
@property(nonatomic,copy)NSString *phonenumber;
//上级电话
@property(nonatomic,copy)NSString *superPhonenumber;
//上级email
@property(nonatomic,copy)NSString *superAdminEmail;
//上级用户名
@property(nonatomic,copy)NSString *superUsername;
//上级地址
@property(nonatomic,copy)NSString *superAdminAddress;
//上级角色
@property(nonatomic,assign)UserRoleType superHierarchyCode;
//头像
@property(nonatomic,copy)NSString *avatar;

//用户id
@property(nonatomic,assign)NSInteger userId;
//角色信息
@property(nonatomic,copy)RHRoleModel *role;

//地区
@property(nonatomic,copy)NSString *serverArea;

//地区编码
@property(nonatomic,copy) NSString *countryCode;
//品牌ID(组织id)
@property(nonatomic,assign) long long brandId;
//最上层品牌
@property(nonatomic,assign) long long topBrandId;
//所属品牌
@property(nonatomic,copy) NSString *brandName;
///地址
@property(nonatomic,copy)NSString *address;
///用户角色   普通用户是8001,申请成为国代或者经销商等角色后会变
@property(nonatomic,assign)UserRoleType hierarchyCode;

@property (nonatomic ,assign)BOOL isSelected;
///运营类型 户储,工商储....
@property(nonatomic,assign) OperationType operationType;

///组织类型(相当于用户角色)
@property(nonatomic,assign) OrganizationType orgType;

//货币种类 0:人民币(CNY)  1:美元(USD) 2:欧元(EUR) 3:日元(JPY) 4:英镑(GBP)  5:澳元(AUD)
@property (nonatomic ,assign) NSInteger currency;
@end

NS_ASSUME_NONNULL_END
